package digitmodell;

public class AndGate extends Gate {
	public AndGate(int id) {
		this.id = id;
		this.value = false;
	}

	protected void setInput(Wire[] InputWires) {
		this.InputWire = InputWires;
	}

	public void setValue() {
		for (int i = 0; i < InputWire.length; i++) {
			if (InputWire[i].getValue() == false) {
				this.value = false;
				
				return;
			}
		}
		this.value = true;

	}
}
